import { useLaunch } from '@tarojs/taro'
import { ConfigProvider } from '@nutui/nutui-react-taro'
import { HoxRoot } from 'hox'
import 'promise-prototype-finally'
import HoxRootProvider from './components/HoxRootProvider'
import "@/common/assets/css/theme/base.less"
//import appConfig from './utils/appConfig'

import './app.less'

function App(props) {
     useLaunch(() => {
        if (process.env.TARO_ENV === 'h5') {
            // 记录当前页面 URL（H5 环境）
            (window as any).entryUrl = window.location.href
        }
    })

      return (
        <ConfigProvider>
             <HoxRoot>
                <HoxRootProvider>
                    {props.children}
                </HoxRootProvider>
            </HoxRoot>
        </ConfigProvider>
    )

}

export default App